﻿using MrPP.iot;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;


namespace MrPP.SerriedCabinet
{
    /*
      public class AreaColumnConfigurationFactory : GDGeek.Singleton<AreaColumnConfigurationFactory>, IEventFactory
      {

        public Action<Data> onRecevie
        {
            get;
            set;
        }

        [Serializable]
        public struct Column
        {
            public string name;
            public byte area;
            public byte index;
            public byte type;
            public byte layers;
            public string left;
            public string right;
              
        }
        [Serializable]
        public class Area
        {
            public string name;
            public byte director;
            public Column[] columns;



        }
        [Serializable]
        public class Room
        {





            public string name;
            public byte index;

            public float getTemperature()
            {
                return (float)(temperature) / 10f;
            }
            public float getHumidity() 
            {

                return (float)(humidity);
            }

         

            public short temperature;
            public byte humidity;
            public Area[] areas;


        }
        [Serializable]
        public class Data
        {
            public Room[] rooms;
        }



        // Start is called before the first frame update
        public string type => "areaColumnConfiguration";
     
        public void post(string data)
        {
            Data evt = JsonUtility.FromJson<Data>(data);
            Debug.Log(JsonUtility.ToJson(evt));
            onRecevie?.Invoke(evt);
        }
    }*/
    
}